﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls.Primitives;
using System.Windows;
using System.Windows.Media;
using CustomControls.ButtonCtr.Base;
using CustomControls.ButtonCtr;

namespace CustomControls.ToggleButtonCtr
{
    public class LayToggleButton : ToggleButton
    {
        /// <summary>
        /// 按钮圆角
        /// </summary>
        [Bindable(true)]
        public CornerRadius CornerRadius
        {
            get { return (CornerRadius)GetValue(CornerRadiusProperty); }
            set { SetValue(CornerRadiusProperty, value); }
        }

        // Using a DependencyProperty as the backing store for CornerRadius.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty CornerRadiusProperty =
            DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(LayToggleButton));

        [Bindable(true)]
        public Brush HoverBackground
        {
            get { return (Brush)GetValue(HoverBackgroundProperty); }
            set { SetValue(HoverBackgroundProperty, value); }
        }

        // Using a DependencyProperty as the backing store for HoverBackground.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty HoverBackgroundProperty =
            DependencyProperty.Register("HoverBackground", typeof(Brush), typeof(LayToggleButton), new PropertyMetadata(Brushes.Transparent));

        [Bindable(true)]
        public Brush FileBrushColor
        {
            get { return (Brush)GetValue(FileBrushColorProperty); }
            set { SetValue(FileBrushColorProperty, value); }
        }

        // Using a DependencyProperty as the backing store for HoverBackground.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty FileBrushColorProperty =
            DependencyProperty.Register("FileBrushColor", typeof(Brush), typeof(LayToggleButton), new PropertyMetadata(new SolidColorBrush(Color.FromRgb(56, 107, 215))));



        [Bindable(true)]
        public Brush HoverBorderBrush
        {
            get { return (Brush)GetValue(HoverBorderBrushProperty); }
            set { SetValue(HoverBorderBrushProperty, value); }
        }

        // Using a DependencyProperty as the backing store for HoverBorderBrush.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty HoverBorderBrushProperty =
            DependencyProperty.Register("HoverBorderBrush", typeof(Brush), typeof(LayToggleButton), new PropertyMetadata(Brushes.Transparent));

        [Bindable(true)]
        public double DataWidth
        {
            get { return (double)GetValue(DataWidthProperty); }
            set { SetValue(DataWidthProperty, value); }
        }

        // Using a DependencyProperty as the backing store for HoverBorderBrush.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty DataWidthProperty =
            DependencyProperty.Register("DataWidth", typeof(double), typeof(LayToggleButton), new PropertyMetadata(10.0));

        [Bindable(true)]
        public double DataHeight
        {
            get { return (double)GetValue(DataHeightProperty); }
            set { SetValue(DataHeightProperty, value); }
        }

        // Using a DependencyProperty as the backing store for HoverBorderBrush.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty DataHeightProperty =
            DependencyProperty.Register("DataHeight", typeof(double), typeof(LayToggleButton), new PropertyMetadata(6.5));


        /// <summary>
        /// 按钮类型
        /// </summary>
        [Bindable(true)]
        public ButtonStyle Type
        {
            get { return (ButtonStyle)GetValue(TypeProperty); }
            set { SetValue(TypeProperty, value); }
        }

        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
        public static readonly DependencyProperty TypeProperty =
        DependencyProperty.Register("Type", typeof(ButtonStyle), typeof(LayToggleButton), new PropertyMetadata(ButtonStyle.Default));

    }
}
